Skip to content

[architect] refactor: delete dead mint HTTP server + caller-auth stack (pkg/mint server.go, caller.go, tokenreview.go) - #6245

Closed
kubestellar-hive[bot] wants to merge 1 commit into
v4from
arch/refactor-mint-deadserver
Closed

[architect] refactor: delete dead mint HTTP server + caller-auth stack (pkg/mint server.go, caller.go, tokenreview.go)#6245
kubestellar-hive[bot] wants to merge 1 commit into
v4from
arch/refactor-mint-deadserver

Conversation

@kubestellar-hive

Copy link
Copy Markdown
Contributor

Refactor

Deletes the never-wired /mint HTTP transport from src/pkg/mint:

  • server.goServer, NewServer, WithAuthenticator, WithEntitlements, Handler, handleMint, handleJWKS, writeJSON, writeErr
  • caller.goSharedSecretAuthenticator.Authenticate, Entitlements.permits, allowed, identityNames and the whole caller-identity seam
  • tokenreview.goTokenReviewAuthenticator, NewInClusterTokenReviewAuthenticator, MultiAuthenticator, readFileTrimmed
  • their four test files, and pkg/mint/README.md, which documents only this front door
  • src/docs/token-mint.md updated: the 'not wired' warnings now say the stack was removed and lives in git history

Why it is dead: cmd/hive/main.go only builds the in-process AgentMinter (buildAgentMinter); config.MintConfig has no listen-address, shared-secret, or entitlement fields, so no configuration path can ever enable the server. golang.org/x/tools/cmd/deadcode confirms every symbol in these files is unreachable from any binary.

Untouched: the live minter (mint.go, agent.go) and its tests. go build ./... and go test ./pkg/mint ./cmd/hive pass.

Disjoint from open architect PRs (#6099 hub heartbeat, #6116 saas store, #6132 dashboard ctor, #6142 tokens scanners, #6149 tmux helpers, #6156 leaderboard style, #6185 kick cadence, #6195 scheduler wrappers, #6201 skillreg, #6212 review prompts, #6214 trust-tier render, #6226 curator, and the proxy Anthropic forwarder PR) — none touch pkg/mint.

Fixes #6244


Filed by architect agent (ACMM L5 — hold-gated mode). Hold-gated: human review required.

— hive: agent=architect backend=copilot model=claude-opus-4-6

…k (pkg/mint/server.go, caller.go, tokenreview.go)

The /mint HTTP transport built in #4436 (Server, handleMint, handleJWKS,
SharedSecretAuthenticator, Entitlements, TokenReviewAuthenticator,
MultiAuthenticator) was never wired to a listener: cmd/hive/main.go only
constructs the in-process AgentMinter via mint.NewMinter/NewAgentMinter,
and MintConfig has no listen-address, secret, or entitlement fields, so
the stack is unreachable from any binary. golang.org/x/tools/cmd/deadcode
confirms every symbol in these files is dead. Delete the three files,
their four test files, and the package README that documented only the
deleted front door; update src/docs/token-mint.md to point at git
history instead.

The live minter (mint.go, agent.go) is untouched; go build ./... and
go test ./pkg/mint ./cmd/hive pass.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: sec-check <sec-check@hive.kubestellar.io>
@kubestellar-hive kubestellar-hive Bot added the hold label Sep 8, 2026
@kubestellar-prow kubestellar-prow Bot added the dco-signoff: yes Indicates the PR's author has signed the DCO. label Sep 8, 2026
@kubestellar-prow

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign hanthor for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@github-actions

github-actions Bot commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Changelog: this PR changes code but carries no changelog entry
(no changelog.d/ fragment and no CHANGELOG.md edit).

If it is user-visible — a feature, a fix an operator would notice, a
security change, a migration, a deprecation, or anything breaking —
please add a fragment file changelog.d/<category>-<pr-or-slug>.md
containing exactly your entry (see changelog.d/README.md; the
category is one of added/changed/deprecated/fixed/security). Please
do not append to CHANGELOG.md's ## Unreleased directly — that
shared section is the merge-conflict generator fragments replaced
(#5675). If it is a refactor, a test-only change, or dependency
churn, no entry is needed and you can ignore this.

This is a reminder, not a gate; it never blocks a merge.

@kubestellar-prow kubestellar-prow Bot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Sep 8, 2026
@clubanderson

Copy link
Copy Markdown
Member

Closing: per operator decision all [architect] refactors retarget to v5, and on v5 this deletion is already done. Commit dc7be66 (#5792, prune dead security subsystem surfaces) removed src/pkg/mint/server.go, caller.go, tokenreview.go, their tests, the loader test and pkg/mint/README.md, and rewrote src/docs/token-mint.md to state that no HTTP mint server is compiled in. Nothing left to rebase.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

copilot dco-signoff: yes Indicates the PR's author has signed the DCO. hold size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[architect] pkg/mint dead HTTP server + caller-auth stack (server.go, caller.go, tokenreview.go) — never wired, no config surface

1 participant